import request from '/@/utils/request';

export function getCategoryList(query?:Object) {
    return request({
        url: '/api/system/category/list',
        method: 'get',
        params:query
    })
}


export function addCategory(data:object) {
    return request({
        url: '/api/system/category/add',
        method: 'post',
        data:data
    })
}


export function editCategory(data:object) {
    return request({
        url: '/api/system/category/edit',
        method: 'put',
        data:data
    })
}


export function deleteCategory(id:number) {
    return request({
        url: '/api/system/category/delete',
        method: 'delete',
        data:{id}
    })
}
